﻿using System;

using Spencen.Mobile.UI;
using Spencen.Mobile.UI.Commanding;
using Spencen.Mobile.UI.Controls;
using Spencen.Mobile.UI.Primitives;
using Spencen.Mobile.UI.Navigation;

namespace Demo.Presenters
{
    public abstract class ParentedPresenter
    {
        private INavigator _navigator;

        public ParentedPresenter( INavigator navigator )
        {
            _navigator = navigator;
            BackCommand = new DelegateCommand( Back );
        }

        public ICommand BackCommand { get; private set; }

        public abstract View CreateView( IDrawingHost host );

        private void Back()
        {
            _navigator.Back();
        }
    }
}
